<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>NetworkManager: NetworkManager Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="NetworkManager Reference Manual">
<link rel="up" href="manpages.html" title="Part I. Manual Pages">
<link rel="prev" href="manpages.html" title="Part I. Manual Pages">
<link rel="next" href="NetworkManager.conf.html" title="NetworkManager.conf">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="manpages.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="manpages.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="NetworkManager.conf.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="NetworkManager"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle">NetworkManager</span></h2>
<p>NetworkManager — network management daemon</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p><code class="command">NetworkManager [OPTIONS...]</code> </p></div>
</div>
<div class="refsect1">
<a name="id-1.2.2.5"></a><h2>Description</h2>
<p>
      The NetworkManager daemon attempts to make networking
      configuration and operation as painless and automatic as
      possible by managing the primary network connection and other
      network interfaces, like Ethernet, Wi-Fi, and Mobile Broadband
      devices.  NetworkManager will connect any network device when a
      connection for that device becomes available, unless that
      behavior is disabled.  Information about networking is exported
      via a D-Bus interface to any interested application, providing a
      rich API with which to inspect and control network settings and
      operation.
    </p>
</div>
<div class="refsect1">
<a name="id-1.2.2.6"></a><h2>Dispatcher scripts</h2>
<p>
      NetworkManager-dispatcher service can execute scripts for the user
        in response to network events. See
        <a class="link" href="NetworkManager-dispatcher.html" title="NetworkManager-dispatcher"><span class="citerefentry"><span class="refentrytitle">NetworkManager-dispatcher</span>(8)</span></a> manual.
    </p>
</div>
<div class="refsect1">
<a name="id-1.2.2.7"></a><h2>Options</h2>
<p>The following options are understood:</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="option">--version</code> | <code class="option">-V</code></span></p></td>
<td><p>Print the NetworkManager software version and exit.
        </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--help</code> | <code class="option">-h</code></span></p></td>
<td><p>Print NetworkManager's available options and exit.
        </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--no-daemon</code> | <code class="option">-n</code></span></p></td>
<td><p>Do not daemonize.
        </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--debug</code> | <code class="option">-d</code></span></p></td>
<td><p>Do not daemonize, and direct log output to the
        controlling terminal in addition to syslog.
        </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--pid-file</code> | <code class="option">-p</code></span></p></td>
<td><p>Specify location of a PID file.  The PID file
        is used for storing PID of the running process and prevents
        running multiple instances.
        </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--state-file</code></span></p></td>
<td><p>Specify file for storing state of the
        NetworkManager persistently.  If not specified, the default
        value of <code class="filename">/var/lib/NetworkManager/NetworkManager.state</code>
        is used.
        </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--config</code></span></p></td>
<td><p> Specify configuration file to set up various
        settings for NetworkManager.  If not specified, the default
        value of <code class="filename">/etc/NetworkManager/NetworkManager.conf</code>
        is used with
        a fallback to the older 'nm-system-settings.conf' if located
        in the same directory.  See
        <a class="link" href="NetworkManager.conf.html" title="NetworkManager.conf"><span class="citerefentry"><span class="refentrytitle">NetworkManager.conf</span>(5)</span></a>
        for more information on configuration file.
        </p></td>
</tr>
<tr>
<td><p><span class="term"> <code class="option">--configure-and-quit</code>  [initrd]</span></p></td>
<td><p>Quit after all devices reach a stable state.
        The optional <code class="literal">initrd</code> parameter enables mode, where no
        processes are left running after NetworkManager stops, which is useful
        for running from an initial ramdisk on rearly boot.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--plugins</code></span></p></td>
<td><p>List plugins used to manage system-wide
        connection settings.  This list has preference over plugins
        specified in the configuration file.  See <code class="literal">main.plugins</code>
        setting in <a class="link" href="NetworkManager.conf.html" title="NetworkManager.conf"><span class="citerefentry"><span class="refentrytitle">NetworkManager.conf</span>(5)</span></a>
        for supported options.
        </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--log-level</code></span></p></td>
<td><p>
          Sets how much information NetworkManager sends to the log destination (usually
          syslog's "daemon" facility).  By default, only informational, warning, and error
          messages are logged. See the section on <code class="literal">logging</code> in
          <a class="link" href="NetworkManager.conf.html" title="NetworkManager.conf"><span class="citerefentry"><span class="refentrytitle">NetworkManager.conf</span>(5)</span></a>
          for more information.
        </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--log-domains</code></span></p></td>
<td><p>
          A comma-separated list specifying which operations are logged to the log
          destination (usually syslog). By default, most domains are logging-enabled.
          See the section on <code class="literal">logging</code> in
          <a class="link" href="NetworkManager.conf.html" title="NetworkManager.conf"><span class="citerefentry"><span class="refentrytitle">NetworkManager.conf</span>(5)</span></a>
          for more information.
        </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--print-config</code></span></p></td>
<td>
<p>
          Print the NetworkManager configuration to stdout and exit. See
          <a class="link" href="NetworkManager.conf.html" title="NetworkManager.conf"><span class="citerefentry"><span class="refentrytitle">NetworkManager.conf</span>(5)</span></a>.
          This does not include connection profiles. View them with <span class="command"><strong>nmcli connection</strong></span>.
        </p>
<p>
          This reads configuration files from disk. If NetworkManager is currently running,
          make sure that it has the same configuration loaded.
        </p>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="id-1.2.2.8"></a><h2>Udev Properties</h2>
<p>
      <span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span>
      device manager is used for the network device discovery. The following
      property influences how NetworkManager manages the devices:
    </p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="varname">NM_UNMANAGED</code></span></p></td>
<td><p>
          If set to <code class="literal">"1"</code> or <code class="literal">"true"</code>, the device is
          configured as unmanaged by NetworkManager. Note that the user still can
          explicitly overrule this configuration via means like
          <span class="command"><strong>nmcli device set "$DEVICE" managed yes</strong></span> or
          <code class="literal">"device*.managed=1"</code> in NetworkManager.conf.
        </p></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="id-1.2.2.9"></a><h2>SIGNALS</h2>
<p>
      NetworkManager process handles the following signals:
      </p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="varname">SIGHUP</code></span></p></td>
<td><p>
          The signal causes a reload of NetworkManager's configuration.
          Note that not all configuration parameters can be changed at
          runtime and therefore some changes may be applied only after
          the next restart of the daemon.
          A SIGHUP also involves further reloading actions, like doing
          a DNS update and restarting the DNS plugin. The latter can be
          useful for example when using the dnsmasq plugin and changing
          its configuration in <code class="filename">/etc/NetworkManager/dnsmasq.d</code>.
          However, it also means this will shortly interrupt name resolution.
          In the future, there may be further actions added.
          A SIGHUP means to update NetworkManager configuration and reload
          everything that is supported. Note that this does not reload
          connections from disk. For that there is a D-Bus API and
          nmcli's reload action
          </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="varname">SIGUSR1</code></span></p></td>
<td><p>
            The signal forces a rewrite of DNS configuration. Contrary
            to SIGHUP, this does not restart the DNS plugin and will not
            interrupt name resolution.

            When NetworkManager is not managing DNS, the signal forces
            a restart of operations that depend on the DNS
            configuration (like the resolution of the system hostname
            via reverse DNS, or the resolution of WireGuard peers);
            therefore, it can be used to tell NetworkManager that the
            content of resolv.conf was changed externally.

            In the future, further actions may be added. A SIGUSR1
            means to write out data like resolv.conf, or refresh a cache.
            It is a subset of what is done for SIGHUP without reloading
            configuration from disk.
          </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="varname">SIGUSR2</code></span></p></td>
<td><p>
            The signal has no effect at the moment but is reserved for future
            use.
          </p></td>
</tr>
</tbody>
</table></div>
<p>
    </p>
<p>
      An alternative to a signal to reload configuration is the Reload D-Bus call.
      It allows for more fine-grained selection of what to reload, it only returns
      after the reload is complete, and it is guarded by PolicyKit.
    </p>
</div>
<div class="refsect1">
<a name="id-1.2.2.10"></a><h2>Debugging</h2>
<p>
      NetworkManager only configures your system. So when your networking setup doesn't
      work as expected, the first step is to look at your system to understand what is actually
      configured, and whether that is correct. The second step is to find out how to tell
      NetworkManager to do the right thing.
    </p>
<p>
      You can for example try to <span class="command"><strong>ping</strong></span> hosts (by
      IP address or DNS name), look at <span class="command"><strong>ip link show</strong></span>, <span class="command"><strong>ip address show</strong></span> and <span class="command"><strong>ip route show</strong></span>,
      and look at <code class="filename">/etc/resolv.conf</code> for name resolution issues.
      Also look at the connection profiles that you have configured in NetworkManager (<span class="command"><strong>nmcli connection</strong></span>
      and <span class="command"><strong>nmcli connection show "$PROFILE"</strong></span>)
      and the configured interfaces (<span class="command"><strong>nmcli device</strong></span>).
    </p>
<p>
      If that does not suffice, look at the logfiles of NetworkManager. NetworkManager
      logs to syslog, so depending on your system configuration you can call <span class="command"><strong>journalctl</strong></span>
      to get the logs.
      By default, NetworkManager logs are not verbose and thus not very helpful for investigating
      a problem in detail. You can change the logging level at runtime with <span class="command"><strong>nmcli general logging level TRACE domains ALL</strong></span>.
      But usually a better way is to collect full logs from the start, by configuring
      <code class="literal">level=TRACE</code> in NetworkManager.conf. See
      <a class="link" href="NetworkManager.conf.html" title="NetworkManager.conf"><span class="citerefentry"><span class="refentrytitle">NetworkManager.conf</span>(5)</span></a>
      manual. Note that trace logs of NetworkManager are verbose and systemd-journald might rate limit
      some lines. Possibly disable rate limiting first with the <code class="literal">RateLimitIntervalSec</code> and
      <code class="literal">RateLimitBurst</code> options of journald (see
      <span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span> manual).
    </p>
<p>
      NetworkManager does not log any secrets. However, you are advised to check whether anything
      private sensitive gets logged before posting. When reporting an issue, provide complete
      logs and avoid modifications (for privacy) that distort the meaning.
    </p>
</div>
<div class="refsect1">
<a name="id-1.2.2.11"></a><h2>/var/lib/NetworkManager/secret_key and /etc/machine-id</h2>
<p>
      The identity of a machine is important as various settings depend on it. For example,
      <code class="literal">ipv6.addr-gen-mode=stable</code> and <code class="literal">ethernet.cloned-mac-address=stable</code>
      generate identifiers by hashing the machine's identity. See also the
      <code class="literal">connection.stable-id</code> connection property which is a per-profile seed
      that gets hashed with the machine identity for generating such addresses and identifiers.
    </p>
<p>
      If you backup and restore a machine, the identity of the machine probably should be preserved.
      In that case, preserve the files <code class="filename">/var/lib/NetworkManager/secret_key</code> and
      <code class="literal">/etc/machine-id</code>. On the other hand, if you clone a virtual machine, you
      probably want that the clone has a different identity. There is already existing tooling on Linux for
      handling <code class="literal">/etc/machine-id</code> (see
      <span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span>).
    </p>
<p>
      The identity of the machine is determined by the <code class="filename">/var/lib/NetworkManager/secret_key</code>.
      If such a file does not exist, NetworkManager will create a file with random content. To generate
      a new identity just delete the file and after restart a new file will be created.
      The file should be read-only to root and contain at least 16 bytes that will be used to seed the various places
      where a stable identifier is used.
    </p>
<p>
      Since 1.16.0, NetworkManager supports a version 2 of secret-keys. For such keys
      <code class="filename">/var/lib/NetworkManager/secret_key</code> starts with ASCII <code class="literal">"nm-v2:"</code>
      followed by at least 32 bytes of random data.
      Also, recent versions of NetworkManager always create such kinds of secret-keys, when
      the file does not yet exist.
      With version 2 of the secret-key, <code class="literal">/etc/machine-id</code> is also hashed as part
      of the generation for addresses and identifiers. The advantage is that you can keep <code class="filename">/var/lib/NetworkManager/secret_key</code>
      stable, and only regenerate <code class="literal">/etc/machine-id</code> when cloning a VM.
    </p>
</div>
<div class="refsect1">
<a name="id-1.2.2.12"></a><h2>Bugs</h2>
<p>
      Please report any bugs you find in NetworkManager at the
      <a class="ulink" href="https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues" target="_top">NetworkManager issue tracker</a>.
    </p>
</div>
<div class="refsect1">
<a name="id-1.2.2.13"></a><h2>See Also</h2>
<p>
      <a class="ulink" href="https://networkmanager.dev" target="_top">NetworkManager home page</a>,
      <a class="link" href="NetworkManager.conf.html" title="NetworkManager.conf"><span class="citerefentry"><span class="refentrytitle">NetworkManager.conf</span>(5)</span></a>,
      <a class="link" href="NetworkManager-dispatcher.html" title="NetworkManager-dispatcher"><span class="citerefentry"><span class="refentrytitle">NetworkManager-dispatcher</span>(8)</span></a>,
      <a class="link" href="NetworkManager-wait-online.service.html" title="NetworkManager-wait-online.service"><span class="citerefentry"><span class="refentrytitle">NetworkManager-wait-online.service</span>(8)</span></a>,
      <a class="link" href="nmcli.html" title="nmcli"><span class="citerefentry"><span class="refentrytitle">nmcli</span>(1)</span></a>,
      <a class="link" href="nmcli-examples.html" title="nmcli-examples"><span class="citerefentry"><span class="refentrytitle">nmcli-examples</span>(7)</span></a>,
      <a class="link" href="nm-online.html" title="nm-online"><span class="citerefentry"><span class="refentrytitle">nm-online</span>(1)</span></a>,
      <span class="citerefentry"><span class="refentrytitle">nm-settings</span>(5)</span>,
      <span class="citerefentry"><span class="refentrytitle">nm-applet</span>(1)</span>,
      <span class="citerefentry"><span class="refentrytitle">nm-connection-editor</span>(1)</span>,
      <span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span>
    </p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>